package org.gruposp2p.dnie.client.ui.panel;

import org.gruposp2p.dnie.client.ui.widget.dynatable.UploadedDocumentsWidget;
import org.gruposp2p.dnie.client.ui.widget.dynatable.UserSignedDocumentsWidget;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class SignedDocumentsPanel extends Composite {

	private static SignedDocumentsPanelUiBinder uiBinder = GWT
			.create(SignedDocumentsPanelUiBinder.class);

	interface SignedDocumentsPanelUiBinder extends
			UiBinder<Widget, SignedDocumentsPanel> {
	}

    @UiField VerticalPanel contentPanel;
    UserSignedDocumentsWidget signedDocuments;
    
	public SignedDocumentsPanel() {
		initWidget(uiBinder.createAndBindUi(this));
		contentPanel.setWidth("991px");
	}

    public SignedDocumentsPanel getInstance () {
        if (signedDocuments == null) {
        	signedDocuments = new UserSignedDocumentsWidget(10);
            contentPanel.add(signedDocuments);
        }
        return this;
    }
}
